<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:choose>
	<c:when test="${msg=='修改失败，密码错误' }">
		<script>
			alert('修改失败')
		</script>
	</c:when>
</c:choose>
<!DOCTYPE html>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>修改密码</title>
<link type="text/css" rel="stylesheet"
	href="fontsawesome/css/font-awesome.css" />
<link type="text/css" rel="stylesheet" href="css/style_index.css" />
<style type="text/css">
.input {
	margin-left: 200px;
}

p {
	font-size: 23px;
	color: rgba(111, 111, 111, 0.6);
	display: block;
}

#tb, .bz {
	margin:0 auto;
	width: 470px;
}

#tb input {
	width: 306px;
	margin-top: 20px;
	height: 30px;
}

#tb tr {
	background-color: #ffffff;
	vertical-align: middle;
}

#tb tr td {
	line-height: 36px;
}

#tb tr td input {
	margin-bottom: 10px;
}



img {
	width: 70px;
	height: 70px;
	border-radius: 50%;
}

table tr td {
	margin-left: 500px;
}

body {
	background-image: url("images/backgroud.jpg");
	width: 100%;
}

@
keyframes fade-in { 0% {
	opacity: 0;
} /*初始状态 透明度为0*/
40%
{
opacity
:
 
0;
} /*过渡状态 透明度为0*/
100%
{
opacity
:
 
1;
} /*结束状态 透明度为1*/
}
@
-webkit-keyframes fade-in { /*针对webkit内核*/ 0% {
	opacity: 0;
}

40%
{
opacity:0;
}
100%
{
opacity:1;
}
}
body {
	animation: fade-in; /*动画名称*/
	animation-duration: 1.5s; /*动画持续时间*/
	-webkit-animation: fade-in 1.5s; /*针对webkit内核*/
}
#bottom_button{
	width:251px;
	margin:50px auto;
	
}
#bottom_button button,input{
	margin-left:20px;
}
</style>
</head>
<body>
	<div class="main_box">
		<h2>
			<span></span>修改密码
		</h2>
		<div class="cont_box">
			<thead>
				<form action="all_admin?flag=update_admin_psw&id=${admin.id }"
					method="post">
					<div class="search_formbox clearfix"></div>


					<table id="tb">
						<tr>
							<td width="210px">输入原密码：</td>
							<td><input type="text" name="old_psw" id='old_psw' value=""></td>
						</tr>
						<tr>
							<td>输入新密码：</td>
							<td><input type="text" name="new_psw" value="" id='new_psw1' required="required"></td>
						</tr>
						<tr>
							<td>再次输入新密码：</td>
							<td><input type="text" name="new2_psw" value="" id='new_psw2' required="required" onblur='isSame()'>
							<span id='same'></span></td>
						</tr>
						
							
								
						
					</table>
					<div id="bottom_button">
						<button id="a1" class="btn blue_btn btne" disabled="disabled">修改密码</button>
								<input id="a2" class="btn blue_btn btne" type="button" value="返回上一级" onclick="location.href='admin_msg.jsp'">
							
					</div>
				</form>
			</thead>
		</div>
	</div>
  <script src="js/jquery-1.10.2.js"></script>
  <script type="text/javascript">
  //这里是验证密码输入的两个框是否相同
  function isSame(){
			var new_psw1=$("#new_psw1").val();
			var new_psw2=$("#new_psw2").val();
			if(new_psw1 == new_psw2){
				$("#same").html("密码相同");
				$("#a1").removeAttr("disabled");
			}else{
				$("#same").html("密码不一致");
				$("#same").css('color','red');
				return false;
			}
		}
  
  </script>
</body>
</html>
